/*
 * Class SuperPiece -can interact with environment 
 * SuperPiece has the same characteristic as a normal piece, but can do tricks because 
 * interact is true
 * Class 3: Req 5
 * Inheritance 
 */

package bejeweled;

import info.gridworld.grid.Grid;
/**
 *
 * @author Michelle
 */
public class superPiece extends Piece{
    //private Grid<Piece> grid;
    //private Location location;
    String imageSuffix; 
    
    /**
     * uses the same String suffix to determine the picture for piece
     * Uses Inheritance (req 7 and 8)
     * @param imageSuffix
     */
    public superPiece(String imageSuffix)
    {
        super(imageSuffix); 
    }
    
    /**
     * Determines whether or not the pieces have the same suffix (image) 
     * @param obj Piece to compare to
     * @return true if the pieces are the same 
     *         false if the pieces are different designs
     */
    public boolean equals (Object obj)
    {
        Piece other = (Piece)obj;
        return getImageSuffix().equals(other.getImageSuffix());    
    }
    
    /**
     * Method determines whether or not the piece is special
     * overrides the interact method from Piece 
     * @return true if the piece can change other pieces
     */
    @Override
    public boolean interact()
    {
        return true; 
    }
    
    /**
     * Method returns the point value of piece
     * @return point value of piece
     */
    @Override
    public int getPointValue()
    {
        return 15; 
    }
}
